{% form_theme form 'ZaysoAreaBundle:Layout:fields.html.twig' %}

{% extends 'ZaysoAreaBundle:Layout:layout.html.twig' %}

{% block title %}Zayso Area - Game - Report{% endblock %}

{% block content %}
<div>
<form action="{{ path('zayso_area_schedule_game_report', { 'id': game.id }) }}" method="post" {{ form_enctype(form) }}>
<table class="game-report">
<tr><th colspan="3">Game Report For: {{ game.num }}</th></tr>
<tr>
    <td style="width: 150px;">{{ form_label (form.num) }}</td>
    <td style="width: 200px;">{{ form_widget(form.num) }}</td>
    <td style="width: 200px;">{{ form_errors(form.num) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.type) }}</td>
    <td>{{ form_widget(form.type) }}</td>
    <td>{{ form_errors(form.type) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.date) }}</td>
    <td>{{ form_widget(form.date) }}</td>
    <td>{{ form_errors(form.date) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.time) }}</td>
    <td>{{ form_widget(form.time) }}</td>
    <td>{{ form_errors(form.time) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.fieldDesc) }}</td>
    <td>{{ form_widget(form.fieldDesc) }}</td>
    <td>{{ form_errors(form.fieldDesc) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.pool) }}</td>
    <td>{{ form_widget(form.pool) }}</td>
    <td>{{ form_errors(form.pool) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.status) }}</td>
    <td>{{ form_widget(form.status) }}</td>
    <td>{{ form_errors(form.status) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.reportStatus) }}</td>
    <td>{{ form_widget(form.reportStatus) }}</td>
    <td>{{ form_errors(form.reportStatus) }}</td>
</tr>
<tr>
    <td>{{ form_label (form.pointsApplied) }}</td>
    <td>{{ form_widget(form.pointsApplied) }}</td>
    <td>{{ form_errors(form.pointsApplied) }}</td>
</tr>
<tr><td colspan="3"><div style="width: 700px; display: block;"><table class="game-report-teams">
<tr>
    <td style="width: 50px;">&nbsp;</td>
    <td style="width: 50px;">Team Key</td>
    <td>Goals<br />Scored</td>
    <td>Cautions<br />Yellow</td>
    <td>Send Offs<br />Red</td>
    <td>Sports-<br />manship</td>
    <td>Fudge<br />Factor</td>
    <td>Points<br />Minus</td>
    <td>Points<br />Earned</td>
</tr>
{% for team in form.teams %}
<tr>
    <td>{{ form_widget(team.type)          }}</td>
    <td>{{ form_widget(team.teamKey)       }}</td>
    <td>{{ form_widget(team.goalsScored)   }}</td>
    <td>{{ form_widget(team.cautions)      }}</td>
    <td>{{ form_widget(team.sendoffs)      }}</td>
    <td>{{ form_widget(team.sportsmanship) }}</td>
    <td>{{ form_widget(team.fudgeFactor)   }}</td>
    <td>{{ form_widget(team.pointsMinus)   }}</td>
    <td>{{ form_widget(team.pointsEarned)  }}</td>
</tr>
{% endfor %}
</table></div></td></tr>
<tr><td colspan="3">{{ form_errors(form) }}</td></tr>
<tr>
    <td colspan="3">{{ form_widget(form.report) }}</td>
</tr>
<tr>
    <td><a href="{{ path('zayso_area_schedule_referee_list') }}#ref-sched-{{game.num}}">Referee Schedule</a></td>
    <td align="center">
        <input type="submit" name="submitted"  value="Submit Report" />
    </td>
    <td align="center">
        {% if is_granted('ROLE_ADMIN') %}
            <input type="submit" name="approved"   value="Approve Report"  />
        {% endif %}
     </td>
</tr>
</table>
{{ form_rest(form) }}    
</form>
</div>

<style>
#layout-content table.game-report
{
    width:     800px;
    border:    3px solid black;
    margin:    2px;
    padding:   2px;
    font-size: 85%;
}
#layout-content table.game-report tr
{
    border: 5px solid black;
}
#layout-content table.game-report td
{
    border: 1px solid black;
}
#layout-content table.game-report-teams
{
    width:     700px;
    border:    3px solid red;
    margin:    0px;
    padding:   0px;
    font-size: 85%;
}

</style>
{% endblock %}
